package com.bskj.common.enums;

public enum RailTypeEnum {
	IN_RAIL(0, "进口"), OUT_RAIL(1, "出口");

	private int key;
	private String value;

	private RailTypeEnum(int key, String value) {
		this.key = key;
		this.value = value;
	}

	public int getKey() {
		return key;
	}

	public void setKey(int key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}
	
	public static RailTypeEnum get(int key) {
		for(RailTypeEnum typeEnum : RailTypeEnum.values()) {
			if(typeEnum.getKey() == key) {
				return typeEnum;
			}
		}
		return null;
	}
}
